<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>     
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style type="text/css">
	.a{
		margin-left: 50px;
	}
	body {
	font-size: 12px;
	background-image: url(images/bg.gif);
	background-repeat: repeat;
	}
	
	
</style>

	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/js/3rd-party/easyUI/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/js/3rd-party/easyUI/themes/icon.css">
	<script type="text/javascript" src="<%=request.getContextPath() %>/js/3rd-party/easyUI/jquery.min.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath() %>/js/3rd-party/easyUI/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath() %>/js/3rd-party/easyUI/locale/easyui-lang-zh_CN.js"></script>
	<link rel="stylesheet" href="<%=request.getContextPath() %>/js/zTree_v3/css/zTreeStyle/zTreeStyle.css" type="text/css"></link>
    <script type="text/javascript" src="<%=request.getContextPath() %>/js/zTree_v3/jquery.ztree.all-3.5.js"></script>

  <%--  <script type="text/javascript">
    
			   var setting = {
						data:{
							simpleData: {
								enable: true,
								idKey: "id",
								pIdKey: "pid",
								rootPId: 0
							},
							key:{
								url: "xUrl"
							}
						    },
						callback:{
							onClick:zTreeOnClick
						},
						 
					};
			  
			  function zTreeOnClick(event, treeId, treeNode) {
					if (!treeNode.isParent) {
						var flag = $("#tabs").tabs("exists",treeNode.name);
						if (flag) {
							$("#tabs").tabs("select",treeNode.name);
						}else {
							$("#tabs").tabs("add",{
								title:treeNode.name,
								href:treeNode.url,
								closable:true
							});
						}
					}
				};
				
				$(function(){
				  var zNodes;
				 var tid = '${teacher.id}';
				 
					    $.ajax({
					    	url:"<%=request.getContextPath()%>/manager/getRoleAndPowerList",
					    	data:{tid:tid},
					    	async:false,		    	
					    	dataType:"text",
					    	success:function(obj){
					    		alert(obj)
					    		 zNodes=obj;
					    	}  
					    });
					  $.fn.zTree.init($("#tree"), setting, zNodes);
})	
   
   
   </script>
 --%>

</head>
  
	
	

<body>

  <%--    
	<a class="a" href="<%=request.getContextPath()%>/list"        target="mainFrame">学生列表</a><br><br>
	<a class="a" href="<%=request.getContextPath()%>/chart/cList" target="mainFrame">查看班级</a><br><br>
	<a class="a" href="<%=request.getContextPath()%>/chart/tList" target="mainFrame">老师列表</a><br><br>
	<a class="a" href="<%=request.getContextPath()%>/chart/sList" target="mainFrame">学生列表</a><br><br>
	<a class="a"href="<%=request.getContextPath()%>/chart/"       target="mainFrame">查看报表</a><br><br> --%>
	
	
	
	
	
	<!-- <DIV style="width: 180px;"   title="导航菜单" split="true"  hide="true">
		 <ul id="tree" class="zTree" style="width:230px; overflow:auto;"></ul>
		
	</DIV> -->
	
	<script type="text/javascript">
	  $(function(){
		  var tid = '${teacher.id}';
			 
		    $.ajax({
		    	url:"<%=request.getContextPath()%>/manager/getRoleAndPowerList",
		    	data:{tid:tid},
		    	async:false,		    	
		    	dataType:"json",
		    	success:function(obj){
		    		$("#aa").empty();
		    		$("#aa").append("<ul>");
		    		for(var i in obj){
		    			$("#aa").append("<li><a href='<%=request.getContextPath()%>"+obj[i].url+"'  target='mainFrame'>"+obj[i].name+"</a></li>");
		    		}
		    		$("#aa").append("</ul>");
		    	}  
		    });
		  
		
	  })
	
	</script>

	<div id ="aa" align="center" style="font-size: 20px">
		
	</div>
	
</body>
</html>